<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2021/10/10
  Time: 19:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>系统登录</title>
    <!-- 引入 Bootstrap -->
    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <style>
        a:hover{
            text-decoration: none;
            color: grey;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="row clearfix">
            <div class="row-md-12">
                <div class="col-xs-offset-3 col-xs-6 form-inline">
                    <div class="page-header">
                        <small>
                            <h3>系统登录</h3>
                        </small>
                        <div class="col-md-offset-11">
                            <button type="button" class="btn btn-default">
                                <a href="${pageContext.request.contextPath}/user/registerPage" style="color: red" >&emsp;register&emsp;</a>
                            </button>
                        </div>
                        <c:if test="${error!=null}">
                            <span id="Password" style="color:red">
                                ${error}
                            </span>
                        </c:if>
                    </div>
                </div>
            </div>
        </div>

        <div class="row clearfix">
            <form class="form-horizontal" action="${pageContext.request.contextPath}/user/login.do" method="post">
                <div class="form-group">
                    <label for="inputUsername" class="col-xs-4 control-label">用户名</label>
                    <div class="col-xs-5">
                        <input type="text" class="form-control" id="inputUsername" name="username" placeholder="Username" required>
                    </div>
                </div>

                <div class="form-group">
                    <label for="inputPassword" class="col-xs-4 control-label">密码</label>
                    <div class="col-xs-5">
                        <%--required 规定必需在提交表单之前填写输入字段。--%>
                        <input type="password" class="form-control" id="inputPassword" name="password" placeholder="Password" required>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-xs-offset-4 col-xs-8">
                        <div class="col-xs-2"></div>
                        <button type="submit" class="btn btn-default">&emsp;登录&emsp;</button>
                        <button type="reset" class="btn btn-default">&emsp;重置&emsp;</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</body>
</html>
